﻿using System;
using System.Collections;

namespace QueuePractice
{
    class Program
    {
        static void Main(string[] args)
        {
            Queue queue = new Queue();
            
            queue.Enqueue("运筹帷幄");
            queue.Enqueue("镇守一方");
            queue.Enqueue("祸害四方");
            Console.WriteLine("男人要么：");
            
            while (queue.Count != 0)
            {
                Console.WriteLine("要么"+ queue.Dequeue());
            }
            


            
            queue.Enqueue("zhang");
            queue.Enqueue("li");
            queue.Enqueue("hu");
            object[] obj = queue.ToArray();
            foreach (var v in obj)
            {
                Console.WriteLine(v);
            }


            
           
            IEnumerator enumerator = queue.GetEnumerator();
            while (enumerator.MoveNext())
            {
                Console.WriteLine(enumerator.Current);
            }
        }
    }
}
